<!DOCTYPE>
<html>
<head>
	<title>6</title>
	<meta charset="utf-8"/>
	<script>
		window.onload=function(){
			var oText=document.getElementById("text1");
			var oBtn=document.getElementById("btn1");
			var oUl=document.getElementById("ul1");
			
			oBtn.onclick=function(){
				var oNode=document.createElement("li");
				oNode.innerHTML=oText.value;
				oUl.appendChild(oNode);
			}
		};
	</script>
</head>
<body>
	<input type="text" id="text1"/>
	<input type="button" id="btn1" value="添加"/>
	<ul id="ul1">
		
	</ul>
</body>
</html>